﻿<%@ Page Language="C#" AutoEventWireup="true" Codebehind="AssetItemEntry.aspx.cs"
    Inherits="MTRC.ODMS.Web.SOM.CodeSetup.AssetItemEntry" %>

<%@ Register Assembly="APJ.Web.UI.WebControls" Namespace="APJ.Web.UI.WebControls"
    TagPrefix="APJ" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="AjaxControlToolkit" %>
<%@ Register Src="~/UserControl/Menu/PageFoot.ascx" TagName="PageFoot" TagPrefix="WebStructure" %>
<%@ Register Src="~/UserControl/Menu/TabStrip.ascx" TagName="TabStrip" TagPrefix="WebStructure" %>
<%@ Register Src="~/UserControl/Menu/PageHead.ascx" TagName="PageHead" TagPrefix="WebStructure" %>
<%@ Register Src="~/UserControl/Menu/MainMenu.ascx" TagName="MainMenu" TagPrefix="WebStructure" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>Operational Data Management System</title>
    <link href="<%=ResolveUrl("~/CSS/common.css")%>" rel="stylesheet" type="text/css" />

    <script type="text/javascript" src="../../Javascript/date-picker.js"></script>

    <script type="text/javascript" src="../../Javascript/CommonFunction.js"></script>

    <script type="text/javascript">
        function CheckEmpty(mes)
        {
            var returnValue = true;
            var assetItem = document.getElementById('txtAssetItem');
            var description = document.getElementById('txtDescription');
            var station = document.getElementById('ddlStation');
            var assetType = document.getElementById('ddlAssetType');
            
            if(assetItem.value.trim().length<1 || description.value.trim().length<1 || station.value.trim().length<1 || assetType.value.trim().length<1)
            {
                returnValue=false;
                alert(mes);
            }
            
            return returnValue;
        }
        
        function CheckNumber(sender)
        {
		    if(!/^[-]?[1-9]\d*$/.test(sender.value) || sender.value.length<1)
		    {  
 			    sender.value=0;  
		    } 
        }
        
        function ShowDetails(clientID)
        {
            window.showModalDialog("../../SOM/Popup/ShowDetails.aspx?PageID=AssetItem&id="+clientID.id,window,"dialogHeight:250px;dialogWidth:300px,center:yes,resizable:no,scroll:no,status:no");
            return false;
        }
        
        function LengthControl(sender)
        {
            if(sender.value.length>=100)
            {
                sender.value=sender.value.substring(0,100);
            }
        }
    
    </script>
    
    <!--Comment by jack 20151023 for u252-->
    <link href="<%=ResolveUrl("~/JqueryUICombox/jquery-ui.css")%>" rel="stylesheet" type="text/css" />
    <script src="<%=ResolveUrl("~/jQuery/jquery-1.6.2.min.js")%>" type="text/javascript"></script>
    <script src="<%=ResolveUrl("~/JqueryUICombox/jquery-ui.js")%>" type="text/javascript"></script>
    <script src="<%=ResolveUrl("~/JqueryUICombox/combox.js")%>" type="text/javascript"></script>
    <script language="javascript" type="text/javascript">
        $(function () {
            InitCombobox();
        });
        function InitCombobox() {
            $(".combobox").combobox();

            $("#toggle").click(function () {
                $(".combobox").toggle();
            });

            $(".custom-combobox").css({ "height": "20px" });

            $(".ui-widget").css({ "width": "80%","margin-right":"1%"});
            $(".custom-combobox input").css({ "width": "200px", "height": "18px", "line-height": "18px" });
            $(".custom-combobox a").css({ "width": "16px", "height": "20px", "position": "relative", "top": "-4px" , "left": "-2px"});
            $(".ui-autocomplete").css({ "max-height": (document.body.clientHeight - 390) + "px" });
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <AjaxControlToolkit:ToolkitScriptManager ID="ToolkitScriptManager" runat="server">
        </AjaxControlToolkit:ToolkitScriptManager>
        <table border="0" cellpadding="0" cellspacing="0" class="Page_Container">
            <tr>
                <td colspan="2" class="Page_Head">
                    <WebStructure:PageHead ID="PageHead" runat="server" />
                </td>
            </tr>
            <tr>
                <td class="Page_Left">
                    <WebStructure:MainMenu ID="MainMenu" runat="server" AppPath="../../" CurrMenuID="M140901" />
                </td>
                <td class="Page_Right">
                    <table class="Page_Contents">
                        <tr>
                            <td class="TabStrip">
                                <WebStructure:TabStrip ID="TabStrip" CurrMenuID="M140803" ParentMenuID="M140901" DMenuMode="CurrOnly"
                                    runat="server" />
                            </td>
                        </tr>
                        <tr>
                            <td class="Contents">
                                <fieldset style="clear: both; margin-bottom: 10px;">
                                    <legend class="title1">
                                        <asp:Label ID="lblMenuCaption" runat="server" Font-Bold="True" Font-Size="Small"
                                            CssClass="CodeSetupCaptionText">Label</asp:Label></legend>
                                    <asp:UpdatePanel runat="server" ID="updatePanel1" UpdateMode="Conditional">
                                        <ContentTemplate>
                                            <table width="100%" border="0" cellpadding="0" style="padding-left: 8px" cellspacing="0">
                                                <tr style="padding-top: 8px">
                                                    <td style="padding-right: 5px; width: 10%;">
                                                        <asp:Label runat="server" ID="lblStation">station:</asp:Label><em>*</em>
                                                    </td>
                                                    <td>
                                                        <asp:DropDownList runat="server" ID="ddlStation" AutoPostBack="True" OnSelectedIndexChanged="ddlStation_SelectedIndexChanged" CssClass="ddlStation">
                                                        </asp:DropDownList></td>
                                                    <td style="padding-right: 8px; width:12%;">
                                                        <asp:Label runat="server" ID="lblAssetType">Asset Type:</asp:Label><em>*</em>
                                                    </td>
                                                    <td>
                                                        <!--Comment by jack 20151023 for U252-->
                                                        <%--<asp:DropDownList runat="server" ID="ddlAssetType"></asp:DropDownList>--%>
                                                        <div style="width:280px;">
                                                        <div class="ui-widget" style="width:230px; float:left;">
                                                            <asp:DropDownList runat="server" ID="ddlAssetType"  CssClass="combobox"></asp:DropDownList>
                                                        </div>
                                                        <div style="float:right;">
                                                            <asp:Button ID="btnClearAssetType" OnClick="btnClearAssetType_Click" runat="server" Text='<%# this.GetLabel("SOM_ClearAssetType") %>'></asp:Button>
                                                        </div>     
                                                        <div>
                                                    </td>    
                                                </tr>
                                                <tr style="padding-top: 5px">
                                                    <td style="padding-right: 5px; width: 10%;">
                                                        <asp:Label runat="server" ID="lblAssetItem">Asset Item:</asp:Label><em>*</em></td>
                                                    <td>
                                                        <asp:TextBox runat="server" MaxLength="20" ID="txtAssetItem"></asp:TextBox></td>
                                                    <td style="padding-right: 8px; width:12%;">
                                                        <asp:Label runat="server" ID="lblObsolete">Obsolete:</asp:Label>
                                                    </td>
                                                    <td><asp:CheckBox runat="server" ID="chkObsolete"/></td><!-- Enabled=false -->
                                                </tr>
                                                <tr style="padding-top: 5px">
                                                    <td style="padding-right: 5px; width: 10%;">
                                                        <asp:Label runat="server" ID="lblStockQty">Stock Qty:</asp:Label></td>
                                                    <td>
                                                        <asp:TextBox runat="server" ID="txtStockQty" Enabled="False"></asp:TextBox></td>
                                                    <td style="padding-right: 8px; width:12%;">
                                                        <asp:Label runat="server" ID="lblAvailableQty">Available Qty:</asp:Label>
                                                    </td>
                                                    <td><asp:TextBox runat="server" ID="txtAvailableQty" Enabled="False"></asp:TextBox></td>
                                                </tr>
                                                <tr style="padding-top: 5px">
                                                    <td valign="top" style="padding-right: 5px; width: 10%;">
                                                        <asp:Label runat="server" ID="lblDescription">Description:</asp:Label><em>*</em>
                                                    </td>
                                                    <td colspan="3">
                                                        <!--Comment by jack 20151023 for U252-->
                                                        <%--<asp:TextBox TextMode="MultiLine" onkeyup="LengthControl(this);" onblur="this.value=value.substring(0,100);"
                                                            runat="server" ID="txtDescription" Height="60px" Width="220px"></asp:TextBox>--%>
                                                        <asp:TextBox onkeyup="LengthControl(this);" onblur="this.value=value.substring(0,100);"
                                                        runat="server" ID="txtDescription" Width="220px"></asp:TextBox>
                                                    </td>
                                                </tr>
                                            </table>
                                        </ContentTemplate>
                                    </asp:UpdatePanel>
                                </fieldset>
                                <table width="100%" border="0px" cellpadding="0px" cellspacing="0px">
                                    <tr style="padding-top: 18px">
                                        <td>
                                            <span style="padding-right: 5px">
                                                <asp:Label runat="server" ID="lblItemSet">This is an Item set:</asp:Label>
                                            </span>
                                            <asp:CheckBox runat="server" ID="chkItemSet" AutoPostBack="True" OnCheckedChanged="chkItemSet_CheckedChanged" />
                                            <span style="padding-right: 5px; padding-left: 18px">
                                                <asp:Label runat="server" ID="lblAssetItemEntryDetail">Asset Item Entry Detail:</asp:Label>
                                            </span>
                                        </td>
                                        <td align="right">
                                            <span style="padding-left: 8px; padding-right: 5px">
                                                <asp:Label runat="server" ID="lblShowVoid">Show Void:</asp:Label>
                                            </span>
                                            <asp:CheckBox runat="server" ID="chkShowVoid" AutoPostBack="True" OnCheckedChanged="chkShowVoid_CheckedChanged" />
                                            <span style="padding-left: 8px">
                                                <asp:Button runat="server" ID="btnDetailNew" Text="Add New" OnClick="btnDetailNew_Click" />
                                            </span>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="2">
                                            <asp:UpdatePanel runat="server" ID="updatePanel2" UpdateMode="Conditional">
                                                <ContentTemplate>
                                                    <APJ:CommonGridView ID="grdAssetItemDetail" runat="server" AllowPaging="True" AllowSorting="True"
                                                        AscPic="~/Images/Common/arrow_up_green.png" AutoGenerateColumns="False" BorderColor="black"
                                                        CssClass="GridView" DescPic="~/Images/Common/arrow_down_green.png" OnRowEditing="grdAssetItemDetail_RowEditing"
                                                        DataKeyNames="AssetItemDtlID,AssetTypeID,SrcAssetItemID,FlagObsolete" OnRowUpdating="grdAssetItemDetail_RowUpdating"
                                                        OnNeedDataBind="grdAssetItemDetail_NeedDataBind" OnRowCancelingEdit="grdAssetItemDetail_RowCancelingEdit"
                                                        OnRowDataBound="grdAssetItemDetail_RowDataBound" OnRowCommand="grdAssetItemDetail_RowCommand" PageLinkCount="7">
                                                        <Columns>
                                                            <asp:BoundField DataField="AssetItemDtlID" HeaderText="SOM_AssetItemDtlID" Visible="False" >
                                                                <controlstyle width="300px" />
                                                                <itemstyle width="1px" />
                                                            </asp:BoundField>
                                                            <asp:BoundField DataField="AssetTypeID" HeaderText="SOM_AssetTypeID" Visible="False" >
                                                                <itemstyle width="1px" />
                                                            </asp:BoundField>
                                                            <asp:BoundField DataField="SrcAssetItemID" HeaderText="SOM_SrcAssetItemID" Visible="False" >
                                                                <itemstyle width="1px" />
                                                            </asp:BoundField>
                                                            <asp:TemplateField HeaderText="SOM_AssetTypeEM">
                                                                <edititemtemplate>
                                                                    <asp:DropDownList id="ddlAssetTypeInGrid" runat="server" OnSelectedIndexChanged="ddlAssetTypeInGrid_SelectedIndexChanged" AutoPostBack="True"></asp:DropDownList>
                                                                </edititemtemplate>
                                                                <itemstyle wrap="False" width="65px" />
                                                                <itemtemplate>
                                                                    <asp:Label id="lblAssetTypeInGrid" runat="server" Text='<%# Eval("AssetType") %>' __designer:wfdid="w4"></asp:Label> 
                                                                </itemtemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="SOM_AssetItemEM">
                                                                <edititemtemplate>
                                                               
<asp:DropDownList id="ddlAssetItemInDetailGrid" runat="server" OnSelectedIndexChanged="ddlAssetItemInGrid_SelectedIndexChanged" AutoPostBack="True" __designer:wfdid="w5"></asp:DropDownList>
</edititemtemplate>
                                                                <itemstyle wrap="False" width="100px" />
                                                                <itemtemplate>
<asp:Label id="lblAssetItemInGrid" runat="server" Text='<%# Eval("AssetItemDetail") %>' __designer:wfdid="w4"></asp:Label> 
</itemtemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="COM_Description">
                                                                <itemstyle width="250px" />
                                                                <itemtemplate>
<asp:Label style="DISPLAY: none" id="lblCOM_Description" runat="server" Text='<%# Bind("Description") %>' __designer:wfdid="w6"></asp:Label> <asp:Label id="lblDetailDescription" runat="server" Text='<%# Bind("Description") %>' __designer:wfdid="w7"></asp:Label> <asp:Button id="btnDtlShowDetail" runat="server" Text="..." __designer:wfdid="w8"></asp:Button> 
</itemtemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="SOM_Qty">
                                                                <edititemtemplate>
<asp:TextBox id="txtSOM_Qty" onkeyup="value=value.replace(/[^\d]/g,'');" runat="server" MaxLength="3" Width="30px" Text='<%# Bind("Qty") %>' __designer:wfdid="w9"></asp:TextBox> <EM>*</EM>
</edititemtemplate>
                                                                <itemstyle wrap="False" width="50px" />
                                                                <itemtemplate>
<asp:Label id="lblSOM_Qty" runat="server" Text='<%# Bind("Qty") %>' __designer:wfdid="w8"></asp:Label> 
</itemtemplate>
                                                            </asp:TemplateField>
                                                            <asp:CheckBoxField DataField="FlagObsolete" HeaderText="SOM_Void" ReadOnly="True" >
                                                                <itemstyle width="6px" />
                                                            </asp:CheckBoxField>
                                                            <asp:TemplateField ShowHeader="False" HeaderText="SOM_Operation">
                                                                <edititemtemplate>
<asp:ImageButton id="imgDtlSave" runat="server" __designer:wfdid="w6" CausesValidation="True" ImageUrl="../../Images/SOM/Save.png" ToolTip='<%# this.GetLabel("COM_Save") %>' CommandName="Update"></asp:ImageButton>&nbsp;&nbsp; <asp:ImageButton id="imgDtlCancel" runat="server" __designer:wfdid="w7" CausesValidation="False" ImageUrl="../../Images/SOM/Cancel.gif" ToolTip='<%# this.GetLabel("COM_Cancel") %>' CommandName="Cancel"></asp:ImageButton> 
</edititemtemplate>
                                                                <itemstyle width="45px" />
                                                                <itemtemplate>
<asp:ImageButton id="imgDtlEdit" runat="server" __designer:wfdid="w5" CausesValidation="False" ImageUrl="../../Images/SOM/Edit.gif" ToolTip='<%# this.GetLabel("COM_Edit") %>' CommandName="Edit"></asp:ImageButton> 
</itemtemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="SOM_VoidOperation">
                                                                <itemstyle width="6px" />
                                                                <itemtemplate>
                                                                <asp:ImageButton ID="imgDtlVoid"  ImageUrl="../../Images/SOM/Void.gif" ToolTip='<%# this.GetLabel("SOM_Void") %>' runat="server" CommandName="Void"></asp:ImageButton> 
                                                            
</itemtemplate>
                                                            </asp:TemplateField>
                                                        </Columns>
                                                        <PagerTemplate>
                                                            <asp:Table ID="CommonPagerTemplate" runat="server" Width="100%">
                                                                <asp:TableRow ID="COMGRIDV_TR" runat="server">
                                                                    <asp:TableCell ID="COMGRIDV_Pager_Cell_TotalRecords" runat="server" CssClass="GridView_Pager_Cell_TotalRecords">
                                                                        <asp:Label ID="Lbl_T_TotalRecords" runat="server">Total Records:</asp:Label>
                                                                        <asp:Label ID="Lbl_V_TotalRecords" runat="server"></asp:Label>
                                                                        &nbsp; &nbsp;
                                                                        <asp:Label ID="Lbl_V_CurPage" runat="server"></asp:Label>
                                                                        &nbsp;<asp:Label runat="server">/</asp:Label>
                                                                        &nbsp;<asp:Label ID="Lbl_V_TotalPages" runat="server"></asp:Label>
                                                                    </asp:TableCell>
                                                                    <asp:TableCell ID="COMGRIDV_Pager_Cell_PageSize" runat="server" CssClass="GridView_Pager_Cell_PageSize">
                                                                        <asp:Label ID="Lbl_T_PageSize" runat="server">PageSize:</asp:Label>
                                                                        &nbsp;&nbsp;<asp:DropDownList ID="DDL_PageSize" runat="server" AutoPostBack="True">
                                                                            <asp:ListItem Value="5">5</asp:ListItem>
                                                                            <asp:ListItem Value="10">10</asp:ListItem>
                                                                            <asp:ListItem Value="15">15</asp:ListItem>
                                                                            <asp:ListItem Value="20">20</asp:ListItem>
                                                                            <asp:ListItem Value="25">25</asp:ListItem>
                                                                            <asp:ListItem Value="30">30</asp:ListItem>
                                                                        </asp:DropDownList>
                                                                    </asp:TableCell>
                                                                    <asp:TableCell ID="COMGRIDV_Pager_Cell_Prev" runat="server" CssClass="GridView_Pager_Cell_Prev">
                                                                        <asp:LinkButton ID="LBtn_Previous" runat="server" CommandArgument="Prev" CommandName="Page"><</asp:LinkButton>
                                                                    </asp:TableCell>
                                                                    <asp:TableCell ID="COMGRIDV_Pager_Cell_PagerLink" runat="server" CssClass="GridView_Pager_Cell_PagerLink">
                                                                        <asp:Panel ID="Pnl_PageLink" runat="server" CssClass="GridView_Pager_PageLinkPanel">
                                                                        </asp:Panel>
                                                                    </asp:TableCell>
                                                                    <asp:TableCell ID="COMGRIDV_Pager_Cell_Next" runat="server" CssClass="GridView_Pager_Cell_Next">
                                                                        <asp:LinkButton ID="LBtn_Next" runat="server" CommandArgument="Next" CommandName="Page">></asp:LinkButton>
                                                                    </asp:TableCell>
                                                                </asp:TableRow>
                                                            </asp:Table>
                                                        </PagerTemplate>
                                                        <RowStyle CssClass="GridView_Row" />
                                                        <HeaderStyle CssClass="GridView_Header" />
                                                        <AlternatingRowStyle CssClass="GridView_AlternativeRow" />
                                                        <EmptyDataRowStyle CssClass="GridView_Header" />
                                                        <EmptyDataTemplate>
                                                            <asp:Table runat="server" CssClass="GridView_Header_EmptyData">
                                                                <asp:TableRow runat="server">
                                                                    <asp:TableCell runat="server" Style="border-right: black 1px solid;" Width="65px"></asp:TableCell>
                                                                    <asp:TableCell runat="server" Style="border-right: black 1px solid;" Width="100px"></asp:TableCell>
                                                                    <asp:TableCell runat="server" Style="border-right: black 1px solid;" Width="250px"></asp:TableCell>
                                                                    <asp:TableCell runat="server" Style="border-right: black 1px solid;" Width="50px"></asp:TableCell>
                                                                    <asp:TableCell runat="server" Style="border-right: black 1px solid;" Width="6px"></asp:TableCell>
                                                                    <asp:TableCell runat="server" Style="border-right: black 1px solid;" Width="45px"></asp:TableCell>
                                                                    <asp:TableCell runat="server" Width="6px"></asp:TableCell>
                                                                </asp:TableRow>
                                                            </asp:Table>
                                                        </EmptyDataTemplate>
                                                    </APJ:CommonGridView>
                                                </ContentTemplate>
                                            </asp:UpdatePanel>
                                        </td>
                                    </tr>
                                    <tr style="padding-top: 18px">
                                        <td>
                                            <asp:Label runat="server" ID="lblAssetItemHistory">Asset Item History:</asp:Label></td>
                                        <td align="right">
                                            &nbsp;<asp:Button runat="server" ID="btnHistNew" Text="Add New" OnClick="btnHistNew_Click" /></td>
                                    </tr>
                                    <tr>
                                        <td colspan="2">
                                            <%--                                                                           <asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="updatePanel3">
                                    <ContentTemplate>--%>
                                            <APJ:CommonGridView ID="grdAssetItemHist" runat="server" AllowPaging="True" AllowSorting="True"
                                                AscPic="~/Images/Common/arrow_up_green.png" AutoGenerateColumns="False" BorderColor="black"
                                                CssClass="GridView" DescPic="~/Images/Common/arrow_down_green.png" DataKeyNames="AssetItemDtlHistID,AssetItemID,TransactionDate"
                                                OnNeedDataBind="grdAssetItemHist_NeedDataBind" OnRowDataBound="grdAssetItemHist_RowDataBound"
                                                OnRowEditing="grdAssetItemHist_RowEditing" OnRowCancelingEdit="grdAssetItemHist_RowCancelingEdit"
                                                OnRowCommand="grdAssetItemHist_RowCommand" PageLinkCount="7">
                                                <Columns>
                                                    <asp:BoundField DataField="AssetItemDtlHistID" HeaderText="ID" Visible="False" ReadOnly="True" >
                                                        <itemstyle width="1px" />
                                                    </asp:BoundField>
                                                    <asp:BoundField DataField="AssetItemID" HeaderText="AssetItemID" Visible="False"
                                                        ReadOnly="True" >
                                                        <itemstyle width="1px" />
                                                    </asp:BoundField>
                                                    <asp:TemplateField HeaderText="SOM_TransactionDateAddEM">
                                                        <edititemtemplate>
<APJ:DateTextBox id="txtTransactionDate" runat="server" __designer:wfdid="w4" ImageUrl="../../images/calendar.gif" Path="../../" JSURL="../../Javascript/date-picker.js" HasTime="True"></APJ:DateTextBox> 
</edititemtemplate>
                                                        <itemstyle wrap="False" width="110px" />
                                                        <itemtemplate>
<asp:Label id="lblTransactionDate" runat="server" Text='<%# FormatDateTime(Eval("TransactionDate"),true)%>' __designer:wfdid="w3"></asp:Label> 
</itemtemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="SOM_ChangeInQuantityAddEM">
                                                        <edititemtemplate>
<asp:TextBox onblur="CheckNumber(this);" id="txtQtyChg" runat="server" MaxLength="3" Text='<%# Eval("QtyChg") %>' __designer:wfdid="w4"></asp:TextBox> 
</edititemtemplate>
                                                        <itemstyle wrap="False" width="50px" />
                                                        <itemtemplate>
<asp:Label id="lblQtyChg" runat="server" Text='<%# Eval("QtyChg") %>' __designer:wfdid="w3"></asp:Label> 
</itemtemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="SOM_AssetItemRemark">
                                                        <edititemtemplate>
<asp:TextBox runat="server" Text='<%# Bind("Remarks") %>' id="txtHistRemarks" width="95%"></asp:TextBox>

</edititemtemplate>
                                                        <itemstyle wrap="False" width="400px" />
                                                        <itemtemplate>
<asp:Label runat="server" Text='<%# Bind("Remarks")%>' style="display:none" id="lblHistRemarks"></asp:Label>
<asp:Label runat="server" Text='<%# Bind("Remarks")%>' id="lblShowHistRemarks"></asp:Label>
<asp:Button ID="btnHistShowDetail" runat="server" Text="..." />
</itemtemplate>
                                                    </asp:TemplateField>
                                                    <asp:CheckBoxField DataField="FlagObsolete" HeaderText="SOM_Void">
                                                        <itemstyle width="6px" />
                                                    </asp:CheckBoxField>
                                                    <asp:TemplateField HeaderText="SOM_Operation">
                                                        <edititemtemplate>
<asp:ImageButton id="btnRowUpdate" CommandName="RowUpdate" ToolTip=<%# this.GetLabel("COM_Save") %>  runat="server" __designer:wfdid="w13" ImageUrl="../../Images/SOM/Save.png"></asp:ImageButton>
 &nbsp;&nbsp;<asp:ImageButton id="btnRowCancel" CommandName="RowCancel" ToolTip=<%# this.GetLabel("COM_Cancel") %>  runat="server" __designer:wfdid="w14" ImageUrl="../../Images/SOM/Cancel.gif"></asp:ImageButton> 
</edititemtemplate>
                                                        <itemstyle wrap="False" width="50px" />
                                                        <itemtemplate>
<asp:ImageButton id="btnRowEdit" style="display:none" CommandName="RowEdit" ToolTip=<%# this.GetLabel("COM_Edit") %> runat="server" __designer:wfdid="w12" ImageUrl="../../Images/SOM/Edit.gif"></asp:ImageButton> 
</itemtemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="SOM_VoidOperation">
                                                        <itemstyle width="6px" />
                                                        <itemtemplate>
                                                            <asp:ImageButton ID="imgHistVoid"  ImageUrl="../../Images/SOM/Void.gif" ToolTip='<%# this.GetLabel("SOM_Void") %>' runat="server" CommandName="Void"></asp:ImageButton> 
                                                        
</itemtemplate>
                                                    </asp:TemplateField>
                                                </Columns>
                                                <PagerTemplate>
                                                    <asp:Table ID="CommonPagerTemplate" runat="server" Width="100%">
                                                        <asp:TableRow ID="COMGRIDV_TR" runat="server">
                                                            <asp:TableCell ID="COMGRIDV_Pager_Cell_TotalRecords" runat="server" CssClass="GridView_Pager_Cell_TotalRecords">
                                                                <asp:Label ID="Lbl_T_TotalRecords" runat="server">Total Records:</asp:Label>
                                                                <asp:Label ID="Lbl_V_TotalRecords" runat="server"></asp:Label>
                                                                &nbsp; &nbsp;
                                                                <asp:Label ID="Lbl_V_CurPage" runat="server"></asp:Label>
                                                                &nbsp;<asp:Label runat="server">/</asp:Label>
                                                                &nbsp;<asp:Label ID="Lbl_V_TotalPages" runat="server"></asp:Label>
                                                            </asp:TableCell>
                                                            <asp:TableCell ID="COMGRIDV_Pager_Cell_PageSize" runat="server" CssClass="GridView_Pager_Cell_PageSize">
                                                                <asp:Label ID="Lbl_T_PageSize" runat="server">PageSize:</asp:Label>
                                                                &nbsp;&nbsp;<asp:DropDownList ID="DDL_PageSize" runat="server" AutoPostBack="True">
                                                                    <asp:ListItem Value="5">5</asp:ListItem>
                                                                    <asp:ListItem Value="10">10</asp:ListItem>
                                                                    <asp:ListItem Value="15">15</asp:ListItem>
                                                                    <asp:ListItem Value="20">20</asp:ListItem>
                                                                    <asp:ListItem Value="25">25</asp:ListItem>
                                                                    <asp:ListItem Value="30">30</asp:ListItem>
                                                                </asp:DropDownList>
                                                            </asp:TableCell>
                                                            <asp:TableCell ID="COMGRIDV_Pager_Cell_Prev" runat="server" CssClass="GridView_Pager_Cell_Prev">
                                                                <asp:LinkButton ID="LBtn_Previous" runat="server" CommandArgument="Prev" CommandName="Page"><</asp:LinkButton>
                                                            </asp:TableCell>
                                                            <asp:TableCell ID="COMGRIDV_Pager_Cell_PagerLink" runat="server" CssClass="GridView_Pager_Cell_PagerLink">
                                                                <asp:Panel ID="Pnl_PageLink" runat="server" CssClass="GridView_Pager_PageLinkPanel">
                                                                </asp:Panel>
                                                            </asp:TableCell>
                                                            <asp:TableCell ID="COMGRIDV_Pager_Cell_Next" runat="server" CssClass="GridView_Pager_Cell_Next">
                                                                <asp:LinkButton ID="LBtn_Next" runat="server" CommandArgument="Next" CommandName="Page">></asp:LinkButton>
                                                            </asp:TableCell>
                                                        </asp:TableRow>
                                                    </asp:Table>
                                                </PagerTemplate>
                                                <RowStyle CssClass="GridView_Row" />
                                                <HeaderStyle CssClass="GridView_Header" />
                                                <AlternatingRowStyle CssClass="GridView_AlternativeRow" />
                                                <EmptyDataRowStyle CssClass="GridView_Header" />
                                                <EmptyDataTemplate>
                                                    <asp:Table runat="server" CssClass="GridView_Header_EmptyData">
                                                        <asp:TableRow runat="server">
                                                            <asp:TableCell runat="server" Style="border-right: black 1px solid;" Width="110px"></asp:TableCell>
                                                            <asp:TableCell runat="server" Style="border-right: black 1px solid;" Width="50px"></asp:TableCell>
                                                            <asp:TableCell runat="server" Style="border-right: black 1px solid;" Width="400px"></asp:TableCell>
                                                            <asp:TableCell runat="server" Style="border-right: black 1px solid;" Width="6px"></asp:TableCell>
                                                            <asp:TableCell runat="server" Style="border-right: black 1px solid;" Width="6px"></asp:TableCell>
                                                            <asp:TableCell runat="server" Width="6px"></asp:TableCell>
                                                        </asp:TableRow>
                                                    </asp:Table>
                                                </EmptyDataTemplate>
                                            </APJ:CommonGridView>
                                            <%--                                     </ContentTemplate>                                        
                                   </asp:UpdatePanel> --%>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr>
                            <td class="Page_Foot" style="height: 54px">
                                <WebStructure:PageFoot ID="PageFoot" runat="server" />
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
        <asp:Panel ID="divFlowMenu" runat="server">
            <img src="../../Images/up.gif" onclick="SwitchMenu(this);" />
            <div>
                <asp:Button ID="btnSave" runat="server" Text="Save" Width="100%" OnClick="btnSave_Click" /></div>
            <div>
                <asp:Button ID="btnSaveNew" runat="server" Text="SaveAndNew" Width="100%" OnClick="btnSaveNew_Click" /></div>
            <div>
                <asp:Button ID="btnSaveReturn" runat="server" Text="SaveAndReturn" Width="100%" OnClick="btnSaveReturn_Click" /></div>
            <div>
                <asp:Button ID="btnVoid" runat="server" Text="Void" Width="100%" OnClick="btnVoid_Click" /></div>
            <div>
                <asp:Button ID="btnCancel" runat="server" Text="Return" Width="100%" OnClick="btnCancel_Click" /></div>
        </asp:Panel>
        <AjaxControlToolkit:AlwaysVisibleControlExtender ID="AlwaysVisibleControlExtender_FlowMenu"
            runat="server" TargetControlID="divFlowMenu" HorizontalSide="right" VerticalOffset="150">
        </AjaxControlToolkit:AlwaysVisibleControlExtender>
    </form>
</body>
</html>
